#define _CRT_SECURE_NO_WARNINGS 1
#include"list.h"
#include<iostream>
using namespace std;

void test1()
{
	peng::list<int> l1;
	l1.push_back(1);
	l1.push_back(2);
	l1.push_back(3);
	l1.push_back(4);
	l1.push_back(5);

	
	for (auto s : l1)
	{
		cout << s << " ";
	}
	cout << endl;

	l1.pop_back();
	l1.pop_back();
	l1.pop_back();
	l1.insert(l1.begin(), 8);
	l1.insert(l1.end(), 8);

	peng::list<int> l2(10, 1);
	swap(l1, l2);
	for (auto s : l1)
	{
		cout << s << " ";
	}
	cout << endl;
	for (auto s : l2)
	{
		cout << s << " ";
	}

}

int main()
{
	test1();

	return 0;
}